package com.ssh.service.impl;

import java.io.Serializable;
import java.util.List;
import java.util.Map;

import com.ssh.dao.IBaseDao;
import com.ssh.service.IBaseService;

public class BaseServiceImpl<T> implements IBaseService<T> {
	
	private IBaseDao<T> baseDao;
	
	public void setBaseDao(IBaseDao<T> baseDao) {
		this.baseDao = baseDao;
	}

	@Override
	public void add(T t) {
		baseDao.add(t);
		
	}

	@Override
	public void delete(T t) {
		baseDao.delete(t);
	}

	@Override
	public void update(T t) {
		baseDao.update(t);
	}

	@Override
	public T findById(Serializable id) {
		return baseDao.findById(id);
	}

	@Override
	public List<T> findAll() {
		return baseDao.findAll();
	}

	@Override
	public List<T> findByConditions(Map<String, Object> conditions) {
		return baseDao.findByConditions(conditions);
	}

}
